package com.astro.business;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.encoding.Md5PasswordEncoder;

import com.astro.dao.UserAccountDAO;
import com.astro.dao.UserDAO;
import com.astro.dao.UserReportDAO;

public abstract class BaseManager {

	@Autowired
	private UserDAO userDAO;
	@Autowired
	private UserAccountDAO userAccountDAO;
	@Autowired
	private UserReportDAO userReportDAO;
	
	public UserDAO getUserDAO() {
		return userDAO;
	}
	
	public UserAccountDAO getUserAccountDAO() {
		return userAccountDAO;
	}

	public UserReportDAO getUserReportDAO() {
		return userReportDAO;
	}

	public String encodeString(String str) {
		Md5PasswordEncoder encode = new Md5PasswordEncoder();
		return encode.encodePassword(str, null);
	}
}
